1. Field of the Invention
This invention relates to the generation of CNC machine tool control programs, in particular, the generation of control programs for use in workpiece measurement operations and other operations on such machine tools.
2. Background of the Invention
CNC machine tools generally accept programs in a low level language for example ISO “G” code. These low level language programs can be produced in a number of ways for loading into the memory of a CNC machine tool controller.
A basic way to produce a machine tool program is to create it by writing the program as commands in a text type program editor in a low level language, but this is laborious. CAD/CAM type programs exist which will generate machine cutting instructions automatically from nominal dimensions of a workpiece which is represented in software. A sequence of high level language instructions are created and post-processed to produce cutting programs in a low level language which is usable by a machine tool. The cutting program has a list of G code commands.
Once a program is post-processed it is then possible to edit the program in the low level language. However, a large amount of editing is again laborious. To aid editing, parts of the low level language program can be cut and/or other parts pasted in.
It is advantageous to have workpiece inspection and measurement operations interleaved with the CNC cutting program so that inspection can take place as work progresses. It is known to paste in probe inspection G code commands into a cutting program used on a machine tool or to type the commands directly. However, it is necessary to ensure that the G code commands are in the correct place and suitable for the purpose. For example, pasted inspection commands will have to have the correct positional data, number of points of contact and probe advance/retreat paths. The pasted inspection instructions will need to be checked to ensure they are correct. This is complicated because the G code used is not easy to interpret.
In addition to probe inspection operations, for greater automation, other auxiliary operations are desirable such as process control and program logic operations. It is desirable to insert auxiliary commands in the form of process control commands and program logic commands into the CNC program when the probe inspection commands are added. Usually these commands are required as a result of probing information. Examples of process control commands are, updating machine tool variables that could be used for modifying tool paths later in the CNC program, updating tool variables e.g. cutter diameter or length, or updating work coordinates. Examples of program logic instructions are: if; then; while; else etc., used to make decisions based on probe inspection data.
Inputting all the auxiliary commands mentioned above into a machine tool program, until the advent of this invention, has been very complicated, because manual input of each command was required.
Whilst the automatic generation of commands is known e.g. U.S. Pat. No. 5,970,431 shows its use for carrying out measurement operations on a coordinate measurement machine, there is no provision for adding such commands to a program used for producing a workpiece.
EP 0879674 describes the generation of a machine tool cutting program which has stop codes (M1) for stopping the program in order that the workpiece can be removed for inspection on a conventional co-ordinate measurement machine (CMM).